Fix and enable the replication StressTest#698
Open
vharseko wants to merge 1 commit into
Open
Conversation
The test was disabled and, once enabled, lost exactly one flow-control
window of messages ("some messages were lost expected [1000] but found
[99]"): its BrokerReader looped on ReplicationBroker.receive() without
ever calling updateWindowAfterReplay(). receive() only decrements the
receive window; publishing the WindowMsg acknowledgements is the
consumer's job (the real replay threads do it), so the replication
server rightfully stopped sending after windowSize messages - one
consumed by the main thread plus 99 by the reader.
Acknowledge the window after each received update, enable the test and
move it into the default build (~18 seconds).
maximthomas
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
StressTest.fromServertoBrokerhas been disabled since the ForgeRock era. Once enabled, it fails with:The loss is exactly one flow-control window (
windowSize=100: one message consumed by the main thread plus 99 by the reader). The test'sBrokerReaderloops onReplicationBroker.receive()without ever callingupdateWindowAfterReplay().receive()only decrements the receive window; publishing theWindowMsgacknowledgements is the consumer's job — the real replay threads do it after processing each update. So the replication server rightfully stopped sending after the first window: the server behaves correctly, the test violated the flow-control protocol.Fix
Acknowledge the window after each received
UpdateMsgin the reader, enable the test and move it into the default build.Verification
Three consecutive runs: 1000/1000 messages received, ~18s each; plus one run under the default CI group filter — green.